package com.itheima.io.bufferedwriter.demo03;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class BufferedWriterDemo01 {

    public static void main(String[] args) throws IOException {

        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter("itheima-io-bufferedwriter\\b.txt"));

        for(int x = 0; x < 10; x++) {

            bufferedWriter.write("hello" + x);
            bufferedWriter.newLine();
            bufferedWriter.flush();

        }

        bufferedWriter.close();

    }

}
